package com.zhangx.mq.demo.rabbit.listener;

import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * @ClassName SimpleConsumer
 * @Description 简单消费者 无法确认，如果跟手动消费一起会轮着消费信息
 * @Author zhangx
 * @Date 2021/4/23 8:46
 **/
@Slf4j
//@Component
//@RabbitListener(queues = "queue1")
public class SimpleConsumer {

    @RabbitHandler
    public void process(String msg){
        log.info("收到消息：{}",msg);
    }
}
